

import request from '@/utils/request'
/**
 * @description: 录播图
 * @param {*}
 * @return {*}
 */
export function bannerList(params) {
    return request.get(
        `/banner/list.php`,
        { params: params }
    )
}

/**
 * @description: 最新产品
 * @param {*}
 * @return {*}
 */
export function newProductList(params) {
    return request.get(
        `/product/list.php?`,
        { params: params }
    )
}

/**
 * @description: 产品分类
 * @param {*}
 * @return {*}
 */
export function productCategory() {
    return request.get(
        `/product/typeList.php`,
    )
}

/**
 * @description: 产品列表
 * @param {*}
 * @return {*}
 */
export function productList(params) {
    return request.get(
        `/product/list.php`,
        { params: params }
    )
}


/**
 * @description: 查询资讯分类
 * @param {*}
 * @return {*}
 */
export function newsCategory() {
    return request.get(
        `/navbar/list.php`,
        { params: { parent_id: 4 } }
    )
}
/**
 * @description: 资讯列表
 * @param {*}
 * @return {*}
 */
export function newsList(params) {
    return request.get(
        `/news/list.php`,
        { params: params }
    )
}

/**
 * @description: 最新到货
 * @param {*}
 * @return {*}
 */
export function newarrivals(params) {
    return request.get(
        `/newarrivals/list.php`,
        { params: params }
    )
}

/**
 * @description: 新货预告
 * @param {*}
 * @return {*}
 */
export function advanceList(params) {
    return request.get(
        `/newproduct/list.php`,
        { params: params }
    )
}

/**
 * @description: 网站留言板
 * @param {*}
 * @return {*}
 */
export function messageList(params) {
    return request.get(
        `/message/list.php`,
        { params: params }
    )
}

/**
 * @description: 查询上传的字段
 * @param {*}
 * @return {*}
 */
export function fieldsList(params) {
    return request.get(
        `/message/fields.php`,
        { params: params }
    )
}

/**
 * @description: 查询上传的字段
 * @param {*}
 * @return {*}
 */
export function getCode(params) {
    return request.get(
        `/message/getCode.php`,
        { params: params }
    )
}

/**
 * @description: 查询上传的字段
 * @param {*}
 * @return {*}
 */
export function submit(data) {
    return request.post(
        `/message/submit.php`,
        data, {
        headers: {
            'Content-Type': 'multipart/form-data' // ⚠️ 注意：不要手动设置！
        }
    }
    )
}


/**
 * @description: 头部导航栏
 * @param {*}
 * @return {*}
 */
export function navbarMenu(params) {
    return request.get(
        `/navbar/list.php`,
        { params: params }
    )
}


/**
 * @description: 头部导航栏详情
 * @param {*}
 * @return {*}
 */
export function navbarMenuInfo(params) {
    return request.get(
        `/navbar/get.php`,
        { params: params }
    )
}

/**
 * @description: 产品详情
 * @param {*}
 * @return {*}
 */
export function getProductInfo(params) {
    return request.get(
        `/product/get.php`,
        { params: params }
    )
}

/**
 * @description: 新货预告详情
 * @param {*}
 * @return {*}
 */
export function getAdvanceInfo(params) {
    return request.get(
        `/newproduct/get.php`,
        { params: params }
    )
}

/**
 * @description: 获取在线交流
 * @param {*}
 * @return {*}
 */
export function onLineCheck(params) {
    return request.get(
        `/online/get.php`,
        { params: params }
    )
}

/**
 * @description: 获取搜索的列表
 * @param {*}
 * @return {*}
 */
export function searchList(params) {
    return request.get(
        `/search/list.php`,
        { params: params }
    )
}